home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
BUSINESS
/
IAT103B.ARJ
/
DEMO.BAT
next >
Wrap
DOS Batch File
|
1992-01-25
|
2KB
|
68 lines
@echo off
cls
echo.
echo This batch file will demonstrate how your system time is automatically
echo changed. In order for this to work, we have saved today's date in a file
echo called TODAY.TXT, so we can change it back in a moment. HOWEVER, if you are a
echo slow reader and the time is after 11PM, it might be a good idea to wait until
echo it is past 12 midnight, just to be safe.
echo.
echo This demo assumes your system date is prior to April 4, 1992. We'll declare
echo today to be March 7 and temporarily change the system date to 03-07-92.
echo.
savedate
tz-check :\ > nul
date 03-07-92
pause
tz-check :\
echo.
echo date 04-15-1992
date 04-15-1992
echo.
echo Now we have changed your system date to April 15, 1992, which is 10 days
echo after Daylight Savings Time begins this year.
echo.
echo Hope this isn't too taxing on you. (Sorry, Couldn't resist.)
echo.
echo Don't worry, we'll put back the correct date as soon as you...
echo.
pause
tz-check :\
echo.
echo And once we change the date back to the correct date...
echo.
date 03-07-92
echo.
echo ...we'll run the program again, and the time is now also corrected...
echo.
pause
tz-check :\
echo.
echo ...and one last time, after we restore the REAL current date.
date < today.txt
echo.
pause
set tz=Standard
tz-check :\
if errorlevel 1 set tz=Daylight
call iprompt.bat
echo.
pause
cls
echo.
echo There. Your system date and time have been reset to what they were.
echo.
ilicense
echo.
echo Something else you may like -- We have also saved your current DOS prompt
echo and, for now, replaced it with one that makes use of the time zone (located in
echo IPROMPT.BAT). We have to end this demo now in order for you to see it. To
echo change it back, just type MYPROMPT and press Enter. If it displays gibberish
echo characters, then you need to install the ANSI.SYS module as a device driver
echo in your CONFIG.SYS file; consult your MS/DOS manual for instructions.
echo
echo.
pause
cls
if exist vid-mode.bat vid-mode